from boardgenerator import BoardGenerator
bg = BoardGenerator()

bg.XMLInit()

# format: ID, Description, Allowed list, Disallowed list

level_id = 0
# auto-increment level as we go through the file

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Factors of 28',
               allowed=[1, 2, 4, 7, 14, 28],
               disallowed=[0, 3, 5, 6, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33]
               )

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Multiples of 3',
               allowed=[3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39],
               disallowed=[1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40]
               )

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Equal to 13',
               allowed=['0+13', '1+12', '2+11', '3+10', '4+9', '5+8', '6+7', '7+6', '8+5', '9+4', '10+3', '11+2', '12+1', '13+0'],
               disallowed=['1+13', '2+13', '3+13', '4+13', '5+13', '6+13', '7+13', '8+13', '9+13', '10+13', '11+13', '12+13', '13+13']
               )


level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Primes',
               allowed=[2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113],
               disallowed=[0, 1, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 15, 25, 35, 45, 55, 65, 75, 85, 95, 105, 115, 9, 21, 27, 33, 39, 51, 57, 63, 69, 81, 87, 93, 99, 111, 21, 35, 49, 63, 77, 91, 105, 119]
               )

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Multiples of 3',
               allowed=[3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39],
               disallowed=[1, 2, 4, 5, 7, 8, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 28, 29, 31, 32, 34, 35, 37, 38, 40]
               )

'''
level_id += 1
bg.XMLAddBoard(level=level_id,
               description="1's",
               allowed=[1],
               disallowed=[0]
               )
'''

level_id += 1
bg.XMLAddBoard(level=level_id,
               description="Animals",
               allowed=['cat', 'dog', 'horse', 'goat', 'cow', 'mule', 'ox', 'emu', 'gnu', 'snake', 'bird'],
               disallowed=['desk', 'chair', 'hair', 'corn', 'olpc', 'shoe', 'car', 'sky', 'tree', 'skin', 'tool']
               )

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Real Numbers',
               allowed=[2,'i^2','-i^4','7','9','1.3','7/6','i^i'],
               disallowed=['i','i','i','i^3','i^5','i^3']
               )

'''
level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Greater than 0',
               allowed=[1],
               disallowed=[0]
               )

'''

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Greater than 4',
               allowed=['3+2','2+3','4+1','6+9','5','4.1'],
               disallowed=['8-5','6-10','4/2','2']
               )

level_id += 1
bg.XMLAddBoard(level=level_id,
               description='Colors',
               allowed=['red','blue','green','pink','cyan','black','white'],
               disallowed=['big','cat','house','rock','bloom','cheese','fish']
               )


# write to this in the local directory
bg.XMLWrite('XOMuncher-init.xml')


